<#import "../common/modern-forms.ftl" as mform/>

<#macro menuform readonly="false">
    <@mform.container>
    <input id="txtId" type="hidden" name="cModelID"/>
    <input id="cFatherModelID" name="cFatherModelID" type="hidden"/>
        <@mform.row>
            <@mform.input_text id="cModelName" name="cModelName"
            label="菜单名称" placeholder="请输入名称" icon="fa-edit" readonly="${readonly}"/>
        </@mform.row>

        <@mform.row>
            <@mform.input_text id="cURL" name="cURL"
            label="菜单地址" placeholder="请输入菜单地址,内部地址以/开头,外部地址http开头"
            icon="fa-edit" readonly="${readonly}"/>
            <@mform.input_text id="iOrder" name="iOrder"
            label="菜单序号" placeholder="请输入一个0~999整数，数字越小越靠前"
            icon="fa-edit" readonly="${readonly}"/>
        </@mform.row>

        <@mform.row>
            <@mform.input_text id="cDescribe" name="cDescribe" size=12
            label="描述" placeholder="请输入描述" icon="fa-edit" readonly="${readonly}"/>
        </@mform.row>

        <@mform.row>
            <@mform.input_text id="icon" name="icon" size=12
            label="图标" placeholder="请输入图标地址" icon="fa-edit" readonly="${readonly}"/>
        </@mform.row>
    </@mform.container>
</#macro>


<#macro modal
id="menuModal"
title="菜单">
<div id="${id}" class="modal fade" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">${title}</h4>
            </div>
            <div class="modal-body">
                <@menuform/>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button id="btnSave" type="button" class="btn btn-success">保存</button>
            </div>
        </div>
    </div>
</div>
</#macro>